﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KaroEngine
{
    public struct TranspositionTableElement
    {
        /// <summary>
        /// Result of the static evaluation function.
        /// </summary>
        public short evaluation;
        /// <summary>
        /// Calculated zorbist hash value.
        /// </summary>
        public int zobristHash;
        /// <summary>
        /// Depth of the stored board situation
        /// </summary>
        public short depth;

        #region Equality and Inequality operators
        public static bool operator ==(TranspositionTableElement element1, TranspositionTableElement element2)
        {
            return ( element1.evaluation == element2.evaluation &&
                     element1.zobristHash == element2.zobristHash &&
                     element1.depth == element2.depth );
        }

        public static bool operator !=(TranspositionTableElement element1, TranspositionTableElement element2)
        {
            return !( element1 == element2 );
        }
        #endregion
    }
}
